﻿@model PartyManagement.Models.Event

@{
    ViewBag.Title = "Edit";
    Layout = "~/Views/Shared/_MyLayout.cshtml";
    bool hasMenu =  ViewBag.hasMenu ;
}
@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
<h2>Edit</h2>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>Event</legend>

        @Html.HiddenFor(model => model.eventID)

        <div class="editor-label">
            @Html.LabelFor(model => model.eventName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.eventName)
            @Html.ValidationMessageFor(model => model.eventName)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.dateEvent)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.dateEvent)
            @Html.ValidationMessageFor(model => model.dateEvent)
            <script>
                $("#dateEvent").datepicker();
            </script>
        </div>
        
        <div class="editor-label">
            @Html.LabelFor(model => model.endDateBook)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.endDateBook)
            @Html.ValidationMessageFor(model => model.endDateBook)
             <script>
                 $("#endDateBook").datepicker();
            </script>
        </div>

     
        <div class="editor-field">
            @Html.HiddenFor(model => model.userID)
            @Html.ValidationMessageFor(model => model.userID)
        </div>
        @Html.Hidden("hasMenu",hasMenu)
        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>


